package com.huaxiafinance.management.mapper;

import com.huaxiafinance.management.model.DistributionRule;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface DistributionRuleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(DistributionRule record);

    int insertSelective(DistributionRule record);

    DistributionRule selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(DistributionRule record);

    int updateByPrimaryKey(DistributionRule record);

    List<Map> getList(@Param("state") Integer state,@Param("name")String name,@Param("page") Integer page,@Param("rows") Integer rows);

    Map selectOne(@Param("id") Integer id);
    
    DistributionRule getOneByGradeId(@Param("id") Integer id);

    Integer countList(@Param("state") Integer state,@Param("name")String name);

    Integer countGradeIsEnble(@Param("gradeId") Integer gradeId);

}